import http from "./request.js";
const header = {
	"Content-Type": "application/x-www-form-urlencoded"
};

class CheckApp {
  constructor() {
    this.getVersion_Api = '/api/upload/getVersion' // 获取服务器版本号
    this.wgtUrl_Api = '/api/upload/downfile' // 更新包下载地址
    this.appInfo_Api = '/api/app/info' // 获取app信息
		
  }
  // 获取服务器版本号
  getVersion(params) {
  	return http.get(this.getVersion_Api, params || {}).then((res) => res.data);
  }
  // 更新包下载地址
	downfile(params) {
		return http.get(this.wgtUrl_Api, params || {}).then((res) => res.data);
	}
  // 获取app信息
	getAppInfo(params) {
		return http.post(this.appInfo_Api, params || {}).then((res) => res.data);
	}
}

export const checkAppApi = new CheckApp();
